package eddy.yang;

import java.awt.Point;

class MyPriorityPoint implements Comparable<MyPriorityPoint> {   
   public MyPriorityPoint(Point p, double priority) {
      this.myPoint = p;
      this.priority = priority;
   }
   
   public Point getPoint() {
      return this.myPoint;
   }
   
   public void setPriority(double p) {
      this.priority = p;
   }
   
   public double getPriority() {
      return this.priority;      
   }
   
   public int compareTo(MyPriorityPoint other) {   
      if(this.priority < other.priority) {
         return 1;
      }
      else if(this.priority > other.priority) {
         return -1;
      }
      return 0;
   }   
   
   private Point myPoint;
   private double priority;
}